<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.prime.com.tr/ui"
        xmlns:finantial="http://java.sun.com/jsf/composite/components/finantial"
        xmlns:c="http://java.sun.com/jsp/jstl/core">

     <p:outputPanel id="pickList1">
            <p:fieldset legend="Escolha os tipos" style="margin: 0!important;padding: 0!important">
                <p:outputPanel rendered="#{reportBean.tipoCorrente eq reportBean.OUTCOME}">
                    <table width="100%" >
                        <tr>
                            <td align="left">
                                <p:pickList value="#{reportBean.outcomeTypesPickList}"   var="r" itemLabel="#{r.description}" itemValue="#{r}" converter="outcomeConveter" >
                                    <f:facet name="sourceCaption">Disponível</f:facet>
                                    <f:facet name="targetCaption">Utilizado</f:facet>
                                </p:pickList>

                            </td>
                            <td>
                                 <p:commandButton value="Atualizar" action="#{reportBean.generateReport1}" update="pickList1 pie" />
                            </td>
                            
                        </tr>
                        <tr>
                            <td style="width: 100px">
                            </td>
                            <td align="center">
                                
                            </td>
                        </tr>
                    </table>
                </p:outputPanel>

                <p:outputPanel rendered="#{reportBean.tipoCorrente eq reportBean.INCOME}">
                   
                     <table width="100%" >
                        <tr>
                            <td align="left">
                                <p:pickList value="#{reportBean.incomeTypesPickList}"   var="r" itemLabel="#{r.description}" itemValue="#{r}" converter="incomeConveter" >
                                    <f:facet name="sourceCaption">Disponível</f:facet>
                                    <f:facet name="targetCaption">Utilizado</f:facet>
                                </p:pickList>

                            </td>
                            <td>
                                 <p:commandButton value="Atualizar" action="#{reportBean.generateReport1}" update="pickList1 pie" />
                            </td>

                        </tr>
                        <tr>
                            <td style="width: 100px">
                            </td>
                            <td align="center">

                            </td>
                        </tr>
                    </table>
                </p:outputPanel>
            </p:fieldset>

        </p:outputPanel>

        <div align="center" style="margin-top: 15px">
            <p:pieChart id="pie" rendered="#{reportBean.isReportOneEnable}" style="chartStyle" value="#{reportBean.tipoValorReport}" var="d" categoryField="#{d.type}"
                        dataField="#{d.valor}"/>

        </div>
    
</ui:composition>